<link media="all" rel="stylesheet" href="css/greeting.css" type="text/css" />
<div id="greetingCont" class="details"><span id="timeInfo"></span>

  <br />
  <br />This is Jack, from Shanghai, China.
  <br />A progammer</div>
<script type="text/javascript">
  function greetingInit()
  {
    var date = new Date();
    var hour = date.getHours();

    if (hour < 6)
    {
      writeTimeInfo("ZZZZzzzzzzzzzzz.............");
    }
    else if (hour < 9)
    {
      writeTimeInfo("Hey! Good morning! Have you had your breakfast yet?");
    }
    else if (hour < 11)
    {
      writeTimeInfo("Greetings! A nice day starts.");
    }
    else if (hour < 13)
    {
      writeTimeInfo("Good afternoon! Having your lunch now?");
    }
    else if (hour < 17)
    {
      writeTimeInfo("Good afternoon!");
    }
    else if (hour < 23)
    {
      writeTimeInfo("Good evening!");
    }
    else
    {
      writeTimeInfo("ZZZZZZZZZzzzzzzzzzzz....Hello...ZZZ");
    }
  }
  greetingInit();

  function writeTimeInfo(text)
  {
    $('#timeInfo').html(text);
  }
</script>
